package com.cpp.common.enums;

import lombok.Getter;

//考试状态：0未发布，1已发布
@Getter
public enum ExamStatus {
    UNPUBLISHED(0,"未发布"),
    PUBLISHED(1,"已发布");

    private Integer code;
    private String message;

    ExamStatus(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public static String getMessageByCode(Integer code){
        for (ExamStatus value : ExamStatus.values()) {
            if (value.getCode().equals(code)) {
                return value.getMessage();
            }
        }
        return null;
    }
}
